package com.xt.base.wireless.server;

import net.sf.json.JSON;
import net.sf.json.xml.XMLSerializer;
public class Xml2Json {

    public static String ConvertXMLtoJSON(String xml)  {
    	String jsonString=null;
        try {
            System.out.println(xml);
            XMLSerializer xmlSerializer = new XMLSerializer();
            JSON json = xmlSerializer.read(xml);
            jsonString = json.toString(1);
            System.out.println(json.toString(1));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return jsonString;
    }
}